{% extends  "warehouse/base.html" %}
{% load erpdata %}

{% block title %}
<title>{{title}}-{{id}}-smallerp</title>
{% if dojo %}
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"
djConfig="parseOnLoad: true"></script>
<script type="text/javascript">dojo.require("dijit.form.Button");
	dojo.require("dijit.Dialog");</script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"
/>
{%endif%}
{% endblock %}

{% block contents %}
<div class="box_o " >
	<div class="rb_1">
	</div>
	<div class="rb_2">
	</div>
	<div class="rb_3">
	</div>
	<div class="rb">
		<h4>{{title}}</h4>
		
		{% if app == 'warehouse_pr' %}
			{% show_pr_status id %}	
		{%endif%}
	
		{% if app == 'warehouse_po' %}
			{% show_po_status id %}	
		{%endif%}
	
		{% if app == 'warehouse_re' %}
			{% show_re_status id %}	
		{%endif%}		
		
		{% if app == 'warehouse_so' %}
			{% show_so_status id %}	
		{%endif%}	
		
		{% if app == 'warehouse_pa' %}
			{% show_pa_status id %}	
		{%endif%}	
			<hr>

			<table class="zebra-table">
				<tr>
					<th></th>
					<th></th>
					<th></th>
				</tr>
				<form action="" method="post">
					{% csrf_token %}

					{% for field in form %}
					<tr>
						<td> {{ field.label_tag }}</td>
						<td> {{ field }}</td>
						<td style="width:200px;color:red;"> {{field.errors}}</td>
					</tr>
					{% endfor %}

					<tr>
						<td colspan="3" style="padding:10px 0 5px 0;">						
						{% if app == 'warehouse_pr' %}
							{% show_pr_items_list id %}	
						{%endif%}
					
						{% if app == 'warehouse_po' %}
							{% show_po_items_list id %}	
						{%endif%}
					
						{% if app == 'warehouse_re' %}
							{% show_re_items_list id %}	
						{%endif%}
		
						{% if app == 'warehouse_so' %}
							{% show_so_items_list id %}	
						{%endif%}
						
						{%if obj.Can_Edit %}
						<input type="submit" class="p" value="保存修改" />
						{%endif%}
						<a class="p" href="{{ current_url }}">返回</a>
				</form>
				</td>
				</tr>
			</table>
		
	</div>
	<div class="rb_4">
	</div>
	<div class="rb_5">
	</div>
	<div class="rb_1">
	</div>
</div>
{% endblock %}